SysTaskCycleTime block

Short summary

Name

SysTaskCycleTime

→POU type

→function

Category

more system blocks, blocks for target-system diagnostics

Graphical interface

Available since

version 1.46.0 (for Neuron Power Engineer) and version 2.3.801 of the →runtime system

(warning) This block is supported for these →target systems or platforms:

version 1.109.0 (for Neuron Power Engineer) and version 3.19.0 of the →runtime system

(warning) This block is supported for these →target systems or platforms: 

Functionality

The block returns the cycle time of the →task in the context of which the block is called.

Return value

 

Identifier

→Data type

Description

Return value:

TIME

configured cycle time – the cycle time defined within the PLC-object

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Example for usage within ST-editor

FUNCTION_BLOCK TestSysTaskCycleTime
     
    VAR
      configured : TIME;
      okConfigured : BOOL;
    END_VAR
     
    configured := SysTaskCycleTime(ENO=>ENO);
    (* Function 'TestSysTaskCycleTime' returns the configured cycle time. *)
    okConfigured := configured = T#500ms;
    ENO := AND(ENO, okConfigured);
     
END_FUNCTION_BLOCK

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.

Restriction for test framework

Do not use this block within a POU under test (see "Testing single POUs by using the test framework") because this block is not supported when a test is executed. Reason: The cycle time is adjusted during the test execution so this block returns faulty data.